package com.gdut.Demo5;

public class Test {
    public static void main(String[] args) {
        Lecturer le = new Lecturer("001", "ZhangSan");
        Tutor tu = new Tutor("002", "LiSi");
        Maintainer ma = new Maintainer("003", "WangWu");
        Buyer bu = new Buyer("004", "ZhaoLiu");
        Work(le);
        le.revise();
        Work(tu);
        Work(ma);
        Work(bu);
        reviseHome(
            new reviseHomework(){
                @Override
                public void revise(){
                    System.out.println("匿名内部类");
                }
            }
        );
        reviseHome(
            () -> {
                System.out.println("daiMa");
                System.out.println("lambda");
            }
        );
    }

    public static void Work(Employee t) {
        t.work();
    }

    public static void reviseHome(reviseHomework t){
        t.revise();
    }
}
